//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _SearchPrositePattern_h__
#define	_SearchPrositePattern_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "libraries.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class SearchPrositePattern {
  
  private:
    
  protected:
    
    String*              sequence;
    String*              pattern;
    
    TListE <String>*     extendedPattern;
    TListE <String>*     segments;
    TListE <int>*        positions;      
    
    String*              toString;
    
    bool                 FoundPatternAndUpdateSegments (String*);
    bool                 FoundPatternAdvanceAndUpdateSegments (String*);
    
  public:
    
    SearchPrositePattern ();
    SearchPrositePattern (const SearchPrositePattern&);
    SearchPrositePattern (const SearchPrositePattern*);
    
    ~SearchPrositePattern ();
    
    void                 Sequence (String*);
    void                 Pattern (String*);
    void                 ExtendedPattern (TListE <String>*);
    void                 Segments (TListE <String>*);
    void                 Positions (TListE <int>*);

    String*              Sequence (void);
    String*              Pattern (void);
    TListE <String>*     ExtendedPattern (void);
    TListE <String>*     Segments (void);
    TListE <int>*        Positions (void);

    String*              ToString (void);
    
    bool                 ExpandPattern (void);
    
    bool                 SearchPattern (void);
    bool                 SearchPattern (String*, String*);
    bool                 SearchPatternAdvance (void);
    bool                 SearchPatternAdvance (String*, String*);

    SearchPrositePattern operator= (const SearchPrositePattern&);
    
};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//

